#include "showfriendapplicationwidget.h"
#include "ui_showfriendapplicationwidget.h"

ShowFriendApplicationWidget::ShowFriendApplicationWidget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::ShowFriendApplicationWidget)
{
    ui->setupUi(this);
    ui->labelShowVerifyInfo->setWordWrap(true);  // 验证消息比较长，启用自动换行

    QString labelQss = "color: black;";
    ui->labelTipId->setStyleSheet(labelQss);
    ui->labelShowId->setStyleSheet(labelQss);
    ui->labelTipNickname->setStyleSheet(labelQss);
    ui->labelShowNickname->setStyleSheet(labelQss);
    ui->labelTipVerifiedInfo->setStyleSheet(labelQss);
    ui->labelShowVerifyInfo->setStyleSheet(labelQss);
    ui->labelTipAlias->setStyleSheet(labelQss);

    // 设置搜索框样式
    ui->inputAlias->setStyleSheet(
        "QLineEdit {"
        "    background-color: #DCEDFF;"                // 背景浅蓝色
        "    border: 2px solid pink;"                // 边框粉色
        "    border-radius: 10px;"                   // 圆角半径
        "    color: gray;"                      // 输入文字浅灰色
        "    padding: 5px;"                          // 内边距（让文字不贴边框）
        "}"
        );
    // 设置搜索按钮样式
    QString qss = R"(
    QPushButton {
        background-color: #FBE6E5;
        border: 2px solid pink;
        color: grey;
        border-radius: 10px;
    }
    QPushButton:hover {
        background-color: #F7DADA;
    }
    QPushButton:pressed {
        background-color: #FFCFD5;
    }
    )";
    ui->btnAccept->setStyleSheet(qss);
    ui->btnReject->setStyleSheet(qss);


}

ShowFriendApplicationWidget::~ShowFriendApplicationWidget()
{
    delete ui;
}


QLabel* ShowFriendApplicationWidget::getShowIdLabel()
{
    return ui->labelShowId;
}

QLabel* ShowFriendApplicationWidget::getShowNicknameLabel()
{
    return ui->labelShowNickname;
}

QLabel* ShowFriendApplicationWidget::getShowVerifyInfoLabel()
{
    return ui->labelShowVerifyInfo;
}

QLineEdit* ShowFriendApplicationWidget::getAliasLineEdit()
{
    return ui->inputAlias;
}

QPushButton* ShowFriendApplicationWidget::getAcceptBtn()
{
    return ui->btnAccept;
}

QPushButton* ShowFriendApplicationWidget::getRejectBtn()
{
    return ui->btnReject;
}

int ShowFriendApplicationWidget::getId() const
{
    return m_id;
}

void ShowFriendApplicationWidget::setId(const int& id)
{
    m_id = id;
}
